package com.example.feign.api;

import com.example.feign.config.FeignLogConfiguration;
import com.example.feign.error.ErrorMessage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * 实现接口
 *
 * @author gg
 * @version 1.0
 * @date 2021/11/9 16:47
 */
@FeignClient(name = "demo", url = "http://localhost:8081/demo",fallback = ErrorMessage.class,configuration = FeignLogConfiguration.class)
@Component
public interface FeignDemo {

    @GetMapping("test")
    public abstract String test();
}
